package net.jlnx.Uebung5_1.util;

public class SortHelper {

	public static <T extends Comparable<T>> void bubbleSort(T[] ys) {
		boolean unsorted = true;
		while (unsorted) {
			unsorted = false;
			for (int i = 0; i < ys.length - 1; i++) {
				if ((ys[i]).compareTo(ys[i + 1]) > 0) {
					T dummy = ys[i];
					ys[i] = ys[i + 1];
					ys[i + 1] = dummy;
					unsorted = true;
				}
			}
		}
	}

}